import request from '@/utils/request'

export function getAllLineList() {
  return request({
    url: `line/all`,
    method: 'get'
  })
}

// 跳转产线接口
export function changeLine(lid, data) {
  return request({
    url: `line/to/${lid}`,
    method: 'post',
    data
  })
}

// 修改产线信息
export function updateLine(lid, data) {
  return request({
    url: `/line/set/${lid}`,
    method: 'post',
    data
  })
}

export function deleteLine(lid) {
  return request({
    url: `/line/delete/${lid}`,
    method: 'delete'
  })
}

export function addLine(data) {
  return request({
    url: `/line/add`,
    method: 'post',
    data
  })
}

// 添加管理成员
export function addRootManager(lid, data) {
  return request({
    url: `/line/member/add/admin/${lid}`,
    method: 'post',
    data
  })
}

// 修改成员权限
export function updateManager(lid, data) {
  return request({
    url: `/line/permission/set/${lid}`,
    method: 'post',
    data
  })
}

// 添加普通成员
export function addMember(lid, data) {
  return request({
    url: `/line/member/add/${lid}`,
    method: 'post',
    data
  })
}
